﻿using System.Threading;
using DimensionsHelper.Common.Contracts.Excel;
using DimensionsHelper.Common.Contracts.Services;

namespace DimensionsHelper.Common.Contracts.DataCollector;

public interface IExcelWriter : IProjectService
{
    /// <summary>
    ///     配置Excel填充器的详细配置。
    /// </summary>
    /// <param name="option"></param>
    void SetOptions(object option);

    /// <summary>
    ///     将给定数据对象写入到给定路径的Excel文档中。
    /// </summary>
    /// <param name="workbook">目标Excel文档</param>
    /// <param name="data">需要写入的数据对象</param>
    void WriteToExcel(IExcelWorkbookOperator workbook, object data);

    /// <summary>
    ///     将给定数据对象写入到给定路径的Excel文档中。
    /// </summary>
    /// <param name="workbook">目标Excel文档</param>
    /// <param name="data">需要写入的数据对象</param>
    /// <param name="cancellationToken">线程取消令牌</param>
    void WriteToExcel(IExcelWorkbookOperator workbook, object data, CancellationToken cancellationToken);
}


public interface IExcelSummaryWriter : IExcelWriter
{
}


public interface IExcelAggregateWriter : IExcelWriter
{
}